const { Sequelize } = require('sequelize');
//将choose_sys是根据
const sequelize = new Sequelize('choose_sys', 'root', 'yourpassword', {
  host: 'localhost',
  dialect: 'mysql'
});

//测试连接是否成功
(
async function() {
    try{
      await sequelize.authenticate()
      console.log('数据库连接成功')
    }catch(err){
      console.log('数据库连接失败')
    }
}
)();

module.exports = sequelize
